package com.yazi.mxz.common.entity.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * GoodsStandardId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class GoodsStandardId implements java.io.Serializable {

	// Fields

	private Long catId;
	private Long storeGoodsId;
	private Long goodsId;

	// Constructors

	/** default constructor */
	public GoodsStandardId() {
	}

	/** minimal constructor */
	public GoodsStandardId(Long catId) {
		this.catId = catId;
	}

	/** full constructor */
	public GoodsStandardId(Long catId, Long storeGoodsId, Long goodsId) {
		this.catId = catId;
		this.storeGoodsId = storeGoodsId;
		this.goodsId = goodsId;
	}

	// Property accessors

	@Column(name = "CAT_ID", nullable = false, precision = 15, scale = 0)
	public Long getCatId() {
		return this.catId;
	}

	public void setCatId(Long catId) {
		this.catId = catId;
	}

	@Column(name = "STORE_GOODS_ID", precision = 15, scale = 0)
	public Long getStoreGoodsId() {
		return this.storeGoodsId;
	}

	public void setStoreGoodsId(Long storeGoodsId) {
		this.storeGoodsId = storeGoodsId;
	}

	@Column(name = "GOODS_ID", precision = 15, scale = 0)
	public Long getGoodsId() {
		return this.goodsId;
	}

	public void setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof GoodsStandardId))
			return false;
		GoodsStandardId castOther = (GoodsStandardId) other;

		return ((this.getCatId() == castOther.getCatId()) || (this.getCatId() != null
				&& castOther.getCatId() != null && this.getCatId().equals(castOther.getCatId())))
				&& ((this.getStoreGoodsId() == castOther.getStoreGoodsId()) || (this
						.getStoreGoodsId() != null && castOther.getStoreGoodsId() != null && this
						.getStoreGoodsId().equals(castOther.getStoreGoodsId())))
				&& ((this.getGoodsId() == castOther.getGoodsId()) || (this.getGoodsId() != null
						&& castOther.getGoodsId() != null && this.getGoodsId().equals(
						castOther.getGoodsId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getCatId() == null ? 0 : this.getCatId().hashCode());
		result = 37 * result + (getStoreGoodsId() == null ? 0 : this.getStoreGoodsId().hashCode());
		result = 37 * result + (getGoodsId() == null ? 0 : this.getGoodsId().hashCode());
		return result;
	}

}